System and method for managing media in a distributed communication network

ABSTRACT

A system and method for processing communication media in a regionally distributed communication platform that includes at a first platform region, establishing a communication session comprising establishing a media communication to at least one endpoint from the first region and establishing signaling communication to a second platform region; selecting a media resource in response to a change in media processing requirements of the communication session; when the selected media resource is outside the first region, routing media communication through a media resource outside of the first region; when the media resource is available in the first region, routing media communication through the media resource of the first region; and when the media resource is outside of the second region, storing the media communication in the first region at least temporarily and tunneling a branch of the media communication to a central media service in the second region.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.14/278,952, filed 15 May 2014, which is a continuation-in-part of priorU.S. application Ser. No. 14/176,458, filed on 10 Feb. 2014, which is acontinuation of prior U.S. application Ser. No. 13/891,111, filed on 9May 2013, which claims the benefit of U.S. Provisional Application Ser.No. 61/644,886, filed on 9 May 2012, all of which are incorporated intheir entirety by this reference.

This application is a continuation of U.S. application Ser. No.14/278,952, filed 15 May 2014, which also claims the benefit of U.S.Provisional Application Ser. No. 61/823,837, filed on 15 May 2013, bothof which are incorporated in their entirety by this reference.

TECHNICAL FIELD

This invention relates generally to the telephony field, and morespecifically to a new and useful system and method for managing media ina distributed communication network.

BACKGROUND

In recent years, innovations in the web application and Voice overInternet Protocol (VOIP) have brought about considerable changes to thecapabilities offered through traditional phone and communicationservices. In some distributed or cloud-based telephony systems, therouting of audio, video, or other media files can be determined orlimited by the location and/or availability of the appropriate computingresources. In some instances, some or all of the callers reside in thesame region, country, or continent as the bulk of the computingresources, thereby promoting increased call quality. However, if one ormore of the parties to the call is located in a different region,country, or continent, then it is not readily apparent which computingresources should be utilized. Similarly, if the platform infrastructureis based in one region, communication outside of that region will bepoor quality. For example, if the two callers reside in differentcountries, it might be unclear which of many computing resources shouldbe allocated to the particular session. Furthermore, as morecommunication platforms are supported by cloud computing serviceslocated in distinct areas, core-computing infrastructure may be limitedto particular locations. Accordingly, there is a need in the art fordetermining the shortest, highest quality, and/or optimized route forsession traffic in a globally distributed telephony system. Thisinvention provides such a new and useful system and method, described indetail below with reference to the appended figures.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 is a schematic block diagram of a system and method for managinglatency in a distributed telephony network in accordance with apreferred embodiment of the present invention;

FIG. 2 is a schematic block diagram of a variation of the preferredsystem and method for managing latency in a telephony network;

FIG. 3 is a communication flow diagram of an example implementation ofthe preferred method for managing latency in a telephony network;

FIGS. 4A-4D are exemplary schematic representations of communicationflow between a first and second region;

FIG. 5 is a communication flow diagram of a variation re-establishingcommunication of the preferred embodiment;

FIG. 6 is an exemplary representation of the system and method of thepreferred embodiment implemented within various regions;

FIG. 7 is an exemplary communication flow diagram of an implementationfor a call between two PSTN devices of the method of the preferredembodiment;

FIG. 8 is an exemplary communication flow diagram of an implementationfor a call between two client devices of the method of the preferredembodiment;

FIG. 9 is an exemplary communication flow diagram of a telephonyapplication with dial followed by a text-to-speech instruction;

FIG. 10 is an exemplary communication flow diagram of a telephonyapplication with a say instruction followed by a dial instruction;

FIGS. 11 and 12 is an exemplary communication flow diagram of atelephony application hanging up a call based on detected input;

FIGS. 13 and 14 is an exemplary communication flow diagram of a calleror callee timing out;

FIG. 15 is schematic representation of a system of a preferredembodiment;

FIG. 16 is a variation of a method with static and service proxies;

FIG. 17 is a schematic representation of components of a recordingservice

FIG. 18 is a flowchart representation of a method for managingcommunication in a distributed communication network;

FIGS. 19A-19H are exemplary modes of communication route topologies ofvarious instances;

FIGS. 20A and 20B are exemplary media and signaling communication routetopologies of various instances;

FIG. 21 is a schematic representation of transitioning betweencommunication route topologies; and

FIG. 22 is a flowchart representation of a method for maintaining mediacommunication in a distributed communication network.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The following description of preferred embodiments of the invention isnot intended to limit the invention to these preferred embodiments, butrather to enable any person skilled in the art to make and use thisinvention.

Preferred System

As shown in FIG. 1, a system 10 of the preferred embodiment isconfigured for managing a distributed communication network operation inat least two regions 12, 14. The preferred system 10 can be used withany suitable cloud-computing environment, such as the one described inpatent application Ser. No. 12/417,630 filed 2 Apr. 2009, entitled“System and Method for Processing Telephony Sessions”, which isincorporated in its entirety by this reference. The system 10 preferablyfunctions to provide the highest quality path for communication betweentwo endpoints in response to one or both of a selected media type and/orthe location/configuration of the endpoints of the communications. As anexample, the preferred system 10 can function to minimize networklatency between different types of endpoints (mobile, PSTN,browser-based telephony, client mobile devices, client browsers) usingdifferent types of media (voice, video, text, screen-sharing,multimedia) and disposed in different regions, countries, or continents.In one preferred embodiment, the system 10 is configured for managing adistributed telephony network, but may alternatively be configured formobile/browser client communication networks, video communication,screen-sharing communication, synchronous media communication, or anysuitable communication network. In operation, the preferred system canperform routing and latency minimization in response to one or more of:the features/capabilities of the endpoints; a media quality measurement(video and audio recording); codec availability/compatibility; mediaresource availability; and/or any suitable metric. During operation, thecommunication flow of the system 10 will preferably shift betweenoperating modes—a first mode comprising communication flow between anendpoint of a local region to a remote region with more resources and asecond mode comprising communication flow substantially within the localregion. Communication flow is preferably a media data stream that isused in the substantially real-time communication of media ormultimedia. An exemplary benefit of the system 10 is that complex,stateful, or expensive communication resources may be maintained inlimited regions and other resources can be implemented globally orregionally to support particular local regions. The limitedcommunication resources may be complex because they maintainconsiderable state information of the platform, and replicating thestate information regionally/globally would result in increasedcomplexity and cost. The limited communication resources can be centralresources that only exist in one designated remote region. But thelimited communication resource may alternatively exist a subset of allregional systems. Communication platforms, which may be susceptible toglobal/regional scaling issues due to the real-time nature ofsynchronous communication, can use the system to dynamically switchbetween communicating within a local region and communicating withresources of a remote region.

As shown in FIG. 1, the preferred system 10 is operable in at least tworegions 12, 14, which are connectable through and/or serviced by acommunication-processing server 16. The preferred system 10 can alsoinclude one or more provider services (P1, P2, P3, PN) and one or moregateways (X1, X2, XN) in the first region 12 and one or morecommunication-processing servers (H1, H2, H3, HN) in the second region14. The preferred system functions to maintain functional communicationwhen the first region 12 and second region 14 are spatially separated bya globally significant transmission distance. A globally significantdistance in this document may be understood to be a transmissiondistance greater than 2000 miles and more preferably greater than 5000miles. For example, the first region 12 may be on the West coast of theUS and the second region 14 may be on the East coast, separated by ageographic distance greater than 2500 miles. In another example, thefirst region 12 may be in the United States and the second region may bein Europe, separated by a distance greater than 3500 miles. The firstregion 12 and the second region 14 are not limited to functioning withsuch distance ranges and may be separated by a distance less than 2000miles or exceeding 5000 miles.

The provider services (P1, P2, P3) preferably receive or initiatecommunication to an endpoint such as a caller, a mobile or browserclient. The provider service is preferably an interface between thecommunication platform of the system 10 and communication providers.Communication providers preferably include telephony carrier networks,client applications using IP based communication protocols, or anysuitable outside network. The system 10 may include a plurality ofregions in addition to the first and second regions 12, 14. The providerservices are preferably specific to each region as they are determinedby the communication service providers, networks, and establishedcontracts with various communication entities. Communication to anendpoint may alternatively be initiated from the platform. For example,an API call may specify that at least one endpoint should be contacted.

Incoming communications to a destination endpoint are preferably routedto the provider services in response to the destination endpoint beingregistered with the system 10. For example, a user dialing a PSTN numberbelonging to the system 10 will preferably have the communicationdirected to a provider service (P1, P2, or P3). Another example, a userdialing a SIP based endpoint that specifies a domain registered in DNSto the system 10 will preferably have the communication directed to aprovider service (P1, P2, or P3). The provider additionally createsinvite requests and responses that are preferably sent to a regionaladdress (e.g., europe.twilio.com) and resolved to a communicationgateway. In some variations, communication may be directly connected toa communication gateway to achieve a lower latency audio/video. This maybe particularly advantageous to mobile and browser clients. The DomainName System (DNS), anycast, or any suitable addressing and routingmethodology may be used to forward to the closest communication gatewayof a particular zone. The provider services preferably use SIP protocolfor communication within the system, but the outside connectedcommunication devices may use any suitable communication protocol. Thesignaling portion of the communication preferably contributes controldirectives and a mechanism to communicate various aspects concerning acommunication session. The media portion of the communication ispreferably the channel through which media is transferred. The medium ofthe communication can preferably include any suitable combination ofpossible media mediums such as audio, video, screen-sharing, virtualenvironment data, or other suitable synchronous media mediums. The mediaportion can be particularly susceptible to latency issues caused by therouting path. The signaling route and the media route can diverge intheir network topology.

The communication gateways (X1, X2) are preferably configured for bothmedia and signaling. A communication gateway preferably mediates SessionInitiation Protocol (SIP) signaling between at least one endpoint of acommunication, from call establishment to termination. SIP is asignaling protocol widely used for controlling communication sessionssuch as voice and/or video calls over Internet Protocol. Any suitablecommunication protocol such as RTP or combination of protocols mayalternatively be used. As a SIP mediator, the communication gatewaypreferably creates SIP invites, issues other SIP signaling messages, andfacilitates transfer of media (e.g., audio, video) between variousend-points. The communication gateways (X1, X2, XN) are preferablylogical network elements of a SIP application, and more preferablyconfigured as back-to-back user agents (b2bua) for one or both of mediaand signaling control. A b2bua, as would be readily understood by aperson of ordinary skill in the art, preferably operates betweenendpoints involved in a communication session (e.g., a phone call, videochat session, or screen-sharing session). The b2bua also divides acommunication channel into at least two communication legs and mediatessignaling between the involved endpoints from call establishment totermination. As such, the communication gateway can facilitate switchingthe communication flow from flowing through a remote region (to useremote resources) to flowing just within the local region (e.g., whenestablishing a call with another endpoint in the local region). Thecommunication gateway may additionally include media processingcomponents/resources such as Dual-tone Multi-frequency (DTMF) detector,media recorder, text-to-speech (TTS), and/or any suitable processor orservice. The media processing and signaling components of acommunication gateway may alternatively be divided into any suitablenumber of components or services in cooperative communication. In onevariation, the communication gateway is implemented by two distinctcomponents—a signaling gateway that handles the signaling and a mediagateway that handles media processing and media communication. In analternative embodiment, the communication gateways may be configured asa control channel that functions to allow devices to directlycommunicate peer-to-peer. Browser clients, mobile clients, or anysuitable combination of clients may have direct media communication inthis variation. This alternative embodiment is preferably used withlow-latency media. As an additional security precaution, communicationgateways may be configured to allow traffic from only a distinct set ofproviders. Other providers are preferably firewalled off to protectinfrastructure from the public Internet. The communication gateways willpreferably respond to communications and/or propagate the communicationmessages to a communication-processing server. Thecommunication-processing server may be in a different remote region.Load balancers may additionally facilitate a communication propagatingfrom a communication gateway to an optimal communication-processingserver. For example, there may be multiple remote regions with availablecommunication-processing servers that can service a communication. Aload balancer or alternatively a routing policy engine may direct thecommunication to an appropriate the region and/orcommunication-processing server.

The communication-processing servers (H1, H2, H3) function to processcommunication from a communication gateway. A communication-processingserver preferably provides value-added features or services to acommunication. A preferred communication-processing server is preferablya call router or telephony application processing component as describedin patent application Ser. No. 12/417,630 referenced and incorporatedabove. A communication-processing server (or more specifically a callrouter) will preferably retrieve an addressable application resource(e.g., HTTP URI address document) associated with the phone number orcommunication indicator. In a preferred embodiment, the resource is atelephony application that indicates sequential telephony commands forthe communication session of the client(s). The telephony commands mayinclude instructions to call another communication endpoint, to start aconference call, to play audio, to record audio or video, to converttext to speech, to transcribe audio, to perform answering machinedetection, to send text or media messages (e.g., SMS or MMS messages),to collect DTMF key entry, to end a call, or perform any suitableaction. The telephony instructions are preferably communicated in atelephony instruction markup language such as TwiML. The addressableresource is preferably hosted at the HTTP Server 16. The servers (H1,H2, H3) and HTTP server 16 communications are preferably RESTful innature in both/all directions. RESTful is understood in this document todescribe a Representational State Transfer architecture as is known inthe art. The RESTful HTTP requests are preferably stateless, thus eachmessage communicated from any component in the system 10 preferablycontains all necessary information for operation and/or performance ofthe specified function. Signaling will preferably be transferred throughthe server, but media may not be transferred through the server.

The communication-processing server is preferably part of a telephonyapplication platform and may cooperatively use several other resourcesin operation. The communication-processing server may be a centralcomponent to the service provided by a platform and as such may beassociated with considerable stateful data generated in use of theserver. The stateful data may be used in internal logic and operation ofthe platform and/or for providing API accessible data and information.The system 10 is preferably implemented in a multi-tenant environmentwhere multiple accounts share/operate with the same resources. As such,there may be benefits in keeping the communication-processing serverscentrally located in a limited number of regions. Since thecommunication-processing server may not be located in each local region,a local region may call out, bridge or otherwise communicate with aremote region that does hold a communication-processing server. Asmentioned above, the communication-processing server may provide anysuitable processing services in addition to or as an alternative to thecall router variation described above.

As shown in FIG. 1, the preferred system 10 can route communicationtraffic between User 1 and User 2, wherein the communications trafficcan include any suitable media type, device endpoint type, and/ornetwork type usable in a suitable cloud-based communications system ofthe type described above. In an example of the preferred system's 10operation, when User 1 wants to communicate with User 2 (a PTSN numberthat is part of the cloud-based system), his call is routed to providerP2. As described below, the number dialed is preferably associated witha URL or other identifier usable in the aforementionedcloud-communications system. Preferably, provider P2 creates acorresponding invite request in block 100 and sends it to a predefinedserver address (e.g., europe.twilio.com, us_1.twilio.com,us_2.twilio.com, etc.), which in turn resolves to communication gatewayX1. Upon receipt, the communication gateway X1 preferably transmits orforwards the request to communication-processing server H3 in blockS102, which as shown can be located in the second region 14. The serverH3 functions to query the HTTP server 16 associated with the URL of thedialed number in block S104 to determine, receive, download, and/orcapture any instructions, commands, or content associated with thedialed number. The HTTP server 16 is preferably an outside servermanaged by a developer or administrating entity. In a simple example,the server H3 contacts the HTTP server 16 and receives a single command(i.e., a “dial” verb) associated with the number. Other suitablecommands (i.e., instruction primitives), each of which can be referredto as a TwiML verb in the example embodiment, can include saying text tothe caller, sending an SMS message, playing an audio and/or video file,getting input from the keypad, recording audio or video, connecting thecall to another phone, or any other suitable type or media ofcommunication. Executing the commands can depend on various mediaservices, which require selecting media resources of the local or aremote region to fulfill the command, and directing media flow throughmedia resources. In some instances that media flow can result in mediaservices being completely fulfilled independent of resources in a remoteregion. Similarly, the media may be routed between two different localregions independent of resources in a central remote region. In otherinstances, the media flow is fully rerouted through at least one remoteregion. In yet another instance, an ancillary media channel can beestablished between the local and remote region to support consistentplatform state.

As shown in FIG. 1, in block S106 the HTTP server 16 returns the TwiMLto server H3, at which point the server H3 processes the TwiML todetermine the particulars of the initial request, i.e., to whom the callis directed, where the other endpoint is located, what type of media isbeing directed to the second user, and the like. In the exampleembodiment shown in FIG. 1, the second user is located in the firstregion 12 with the first user, and therefore the server H3 returns theinvite request back to communication gateway X1 for further processingin block S108. Upon receipt, the communication gateway X1: determinesthat the inbound request is related to the prior invite request receivedin block S100; and transmits the request to a predetermined provider P3in block S110 for eventual connection of the communication to the seconduser from P3. Preferably, upon connection between provider P3 and thesecond user, the communication traffic between the first and secondusers will flow directly between the providers P2 and P3 in block S112with little to no input from any other component of the preferred system10 in the second region 14. In one variation of the preferred system 10,media files and/or functionality are stored at and/or performed by oneor more of the communication gateways X1 working alone or in combinationwith each other or additional servers, databases, and/or controllers. Aswill be described in further detail below, the communication traffic maybe subsequently dynamically redirected to route through the server H3.For example, one of the endpoints may hang up, and the remainingendpoint may have communication traffic flow from the endpoint of P1 toX1 to H3 and back during the execution of other communicationinstructions.

As shown in FIG. 2, one variation of the preferred system 10 canadditionally include a routing policy server 50 in communication withthe communication gateway XN 20 and/or a communication-processing serverH3, and further include a SIP API 30 in communication with both thecommunication gateway 20 and server HN 40. In one example configurationof the preferred system 10, the communication gateway 20 functions inpart as a back-to-back user agent (b2bua) for one or both of media andsignaling control. As an example, the communication gateway 20 can beconfigured to handle multiple types of re-invite scenarios and totransfer audio, video, or other media between various communicatingendpoints. Preferably, the communication gateway 20 can be configured torecord audio or video streams and/or play any suitable type of mediafile (e.g., addressed to a URL). In other configurations of thepreferred system 10, the communication gateway 20 can be configured as areal-time transport protocol (RTP) hub for handling RTP communications,RTP events, and/or generating/consuming RTPC sender and receiverreports. As described below, the RTPC reports can be transmitted and/ormade available to the policy server 50 such that the policy server 50has real-time or near real-time information about the quality ofdifferent traffic routes in the larger system 10. The quality reportsand the routing policy server 50 can additionally work in cooperationwith a best quality routing (BQR) routing approach. In another variationof the preferred system 10, the communication gateway 20 can beconfigured as a single component/unit that handles both media andsignaling processes. Alternatively, the communication gateway 20 can beconfigured as two distinct components (media and signaling) residing onone or more nodes in the larger system 10 environment or in any othersuitable configuration or deployment in a distributed network.

As shown in FIG. 2, the present variation of the preferred system 10 caninclude a routing policy server 50 in communication with thecommunication-processing server and/or the communication gateway 20. Therouting policy server 50 preferably functions to optimize the flow oftraffic throughout the preferred system 10 by selecting and/or aiding inselecting the best available communication gateway 20 (X1, X2, XN)and/or communication-processing server (H1, H2) for routing the networktraffic. Preferably, the routing policy server 50 optimizes traffic flowin response to one or both of the types/number/location of the endpoints(browser, VOIP, PSTN, mobile/cellular) and the type of media (voice,video, text, multimedia) used in each communication. As shown in FIG. 2,the routing policy server 50 preferably receives input/s from each ofthe communication gateways 20, for example in the form of RTCP senderand receiver reports, which enables the routing policy server 50 todetermine in real time or near real time the current status of each ofthe communication gateways 20, and in turn to select the optimalcommunication gateway 20 for any present network session. Preferably,one or both of the communication gateway 20 and/or the server 40 canquery the routing policy server 50 for the optimal route, which can bedetermined in response to one or more inputs received/requested from thecommunication gateway 20. Additionally or alternatively, the routingpolicy server 50 can receive from each communication gateway 20 a livequality of service report from which the policy server 50 can determinethe current optimal route for any pending sessions. In another variationof the preferred system 10, the routing policy server 50 can apply auniversal or generic routing protocol between nodes withoutconsideration of the type of media being enjoyed in the communicationsession. In use, the preferred policy server 50 can function to preventoverloading of any particular node, server, or route in the preferredsystem 10 by continuously and substantially simultaneously selectingand/or aiding in the selection of the optimally configured communicationgateway 20 and/or server 50 for each pending session.

As shown in FIG. 2, the present variation of the preferred system 10 canfurther include one or more application programming interfaces (APIs)functioning and/or exposed by one or more components in the preferredsystem 10. For example, a session initiation protocol (SIP) API 30 isshown in FIG. 2 for coordinating messages/communications between thecommunication gateway 20 and the server 40. Additionally oralternatively, the routing policy server 50 can include one or more APIsfor determining the optimal route between two endpoints in the pendingcommunication. A preferred routing policy server 50 API can be a RESTFulor any suitable alternative type of API. As noted above, in onealternative configuration the communication gateway 20 can include amedia portion and a signaling portion, in which case the media portion(not shown) can include an API (such as a REST or Java API) to respondto media allocation requests from the signaling portion (not shown) ofthe communication gateway 20. In operation, a suitable communicationgateway 20 API can expose one or more functionalities (i.e., allocationof a media resource with the following capabilities) and then return aresource identifier, IP address, and/or port to where the media shouldbe directed.

The SIP API 30 can include one or more additional headers and/orconfigurations for use in the preferred system 10, including a regionalheader, an action header, a features header, a support header, and/or arequired header. In this example implementation, the regional header canindicate a zone from which the request is originating, including forexample a regional or sub-regional zone of Europe, Asia, North America,and/or South America. The example action header can include instructionsfor the receiver to perform one or more designated actions, such as a“hang up” action. The example features header can include one or moresystem 10 specific features, such as an instruction to hang up if theuser presses the star key on his or her terminal, whether the hardwaresupports call recording, and the like. The example support/requiredheaders can include information that identify any features, protocols,functions, and/or other features that are desirable, optional, ornecessary for properly routing the session through any particular set ofcommunication gateways 20 and servers 40.

The system preferably can be configured to perform one or more of theforegoing functions in a computer-readable medium storingcomputer-readable instructions. The instructions are preferably executedby computer-executable components preferably integrated with the one ormore communication gateways (X1, X2, XN) in the first region 12, the oneor more communication-processing servers (H1, H2, H3, HN) in the secondregion 14, the HTTP server 16, the SIP API 30, and/or the routing policyserver 50. The computer-readable medium can be stored on any suitablecomputer readable media such as RAMs, ROMs, flash memory, EEPROMs,optical devices (CD or DVD), hard drives, floppy drives, or any suitabledevice. The computer-executable component is preferably a processor butthe instructions can alternatively or additionally be executed by anysuitable dedicated hardware device.

Preferred Method

As shown in FIG. 3, a method of the preferred embodiment can includereceiving a communication invitation of a first endpoint from acommunication provider S210, signaling the communication invitation to acommunication-processing server in a second region S220, dynamicallydirecting signaling and media of the communication according tocommunication processing instructions and the resources available in atleast the first and second regions S230 that includes selectivelyrouting media communication exclusively through communication resourcesof the first region if media resources to execute the processinginstructions are available in the first region S232 and selectivelyrouting media communication through at least thecommunication-processing server if media resources are not in the firstregion S234. The system functions to dynamically redirect traffic forsignaling and media. The method is preferably employed in aregionally/globally distributed communication platform that works withcommunication susceptible to latency performance issues. The method ispreferably used within a communication processing platform such as thetelephony platform incorporated by reference above. The method mayadditionally or alternatively be used with video communication, clientbased audio communication (e.g., VoIP), screen-sharing applications,and/or any suitable communication platform. Replicating all componentsin different regions can be expensive and increase complexity of asystem. The method enables components to be intelligently andprogressively rolled out to new regions (or be statically implemented)without fully replicating the system needed to support the features of aplatform—some components may be available in one region and some inothers. Preferably, a geographically distributed communication computingplatform will include a subset of resources in a first region and asubset of resources in a second region. The subsets of resources arepreferably not identical sets (in terms of the function of thecomponents). A local region (used to service particular geographicregions) is preferably a limited sub-set of a remote region (used toprovide core platform functionality). Preferably lightweight andancillary services and components (e.g., signaling and standalone mediaprocessing services) are deployed in various regions to support localcommunication endpoints, and more core or complex resources (e.g., onesthat maintain state within the platform) are deployed in a limitednumber of regions, which are often remotely located from the localregions. The method is preferably used to implement communicationinstruction processing with a communication stream between the first andsecond region as shown in FIGS. 4A and 4B, and when a mediacommunication stream can flow exclusively through the first region,dynamically establishing the communication flow to not flow throughintermediary media resources of the second region, but instead to usemedia resources of the first region as shown in FIGS. 4C and 4D.

Block S210, which includes receiving a communication invitation of afirst endpoint from a communication provider, functions to initiate acommunication session. Preferably a “call” will be directed to thesystem through a provider service of the first region. The calleddestination is preferably registered with the system. For example, thetelephony endpoint (the phone number, phone number prefix, SIP address,the domain of the SIP address, and the like) is used to routecommunication to the system in any suitable manner. The providerservices preferably ports or provides a network access interface throughwhich outside communication networks connect to the system (and/orconversely, how the system connects to the outside communicationnetworks). A communication will preferably include a call from anendpoint being directed through outside networking to a provider serviceinterface. The provider service will preferably use SIP signaling or anysuitable protocol to direct a communication stream to a communicationgateway of the first region. A SIP communication invite is preferablyreceived at the communication gateway or more specifically a SIPsignaling gateway acting as a b2bua. Herein, “calls” may refer to PSTNphone calls, IP based video calls, screen-sharing sessions, multimediasessions, and/or any suitable synchronous media communication. Calls canadditionally be mixed medium/protocols. For example, a call (i.e.,communication session) may have one leg connect to a PSTN telephonydevice while a second leg connects to a SIP based client application.Calls may alternatively be initiated from within the system such as inresponse to an API request or any suitable event.

The communication session preferably includes a signaling and mediacommunication to an endpoint through a provider service connector in theregion of the endpoint (i.e., a local region). In one variation, onlyone endpoint may include in the communication session, such as where theplatform provides media interactions with the endpoint. In anothervariation, the endpoint communication with one or more endpoints. Theother endpoint(s) can be in the same local region, a central remoteregion, and/or a remote region that serves a local area. Block S210preferably includes establishing a media communication to at least oneendpoint and a signaling communication. As described below, thecommunication session will preferably additionally include establishing,at least at one point, a signaling communication to the remote regionwhere control logic can facilitate directing the media communication.

Block S220, which includes signaling the communication invitation to acommunication-processing server in a second region, functions to directthe communication to a communication-processing server in anotherregion. The other region (the second region) is preferably spatiallyseparate and remotely located from the first region. The distance ofseparation is preferably a globally significant distance. Within the US,the distance may be greater than 2000 miles (across country). Across theglobe, the distance may be greater than 5000 miles. The communicationgateway preferably directs the communication signaling. As shown in FIG.7, the communication invitation is preferably a SIP invite but mayalternatively be a communication invitation of any suitable protocol.The communication gateway may additionally query a routing policy engineprior to transmitting the communication invitation. The routing policyserver will preferably determine an appropriate routing of the call.Preferably the routing policy server will identify the appropriatecommunication-processing server in the second region. Additionally, therouting policy server may consider communication-processing servers in aplurality of regions (possibly including the first region). In anothervariation, the routing policy server may detect that the resources forprocessing the particular call can be handled within the first regionand direct that call appropriately within the first region. For example,a particular phone number may not be configured for telephonyapplication processing and simply redirect to another endpointaccessible through the first region. In this example, the communicationgateway may forego accessing a call router in a second region, andestablish media communication flow between the first and second endpointusing resources of the first region.

The communication-processing server can provide any suitablecommunication processing service. The communication-processing serverand/or any suitable component can trigger modification of the mediacommunication wherein at least one media resource in the mediacommunication route is changed. The change preferably includes adding amedia resource, but the change may additionally or alternatively includeremoving a media resource. Preferably, the communication-processingserver acts as a call router that manages execution of a communicationsession application. Processing a communication application can includeoperations such as connecting to endpoints, recording media, processingmedia (converting text-to-speech, transcribing audio to text,transcoding between media codecs), retrieving device inputs (e.g., DTMFcapture), sending messages or emails, ending calls, providing answeringmachine detection, or providing any suitable service. In one preferredvariation, the method may additionally include, within the secondregion, a communication-processing server retrieving applicationinstructions from an internet accessible server at a URI that isassociated with a destination endpoint of the communication invitation.In this variation, the communication-processing server is preferably acall router as described in the incorporated patent application Ser. No.12/417,630. The application instructions are preferably formatted asmarkup instructions within a document retrieved over HTTP using a webrequest-response model.

Block S230, which includes dynamically directing signaling and media ofthe communication according to communication processing instructions andthe resources available in at least the first and second regionsfunctions to redirect communication to appropriate regions. Thedirecting of signaling and media is preferably dynamically responsive tothe active state of the communication. Preferably, the signal and mediadirection is responsive to application state of a communication.Application state may include streaming media between two outsideendpoints, playing media from the system to an endpoint, processing orrecording media of a communication, or any suitable application state.The communication routing is preferably changed to increase thecommunication performance of the current state of a communication. Forexample, if a first endpoint is connected to a second endpoint, and thefirst and second endpoints are in the same region, the communicationmedia stream is preferably kept within the first region. This canpreferably reduce the amount of communication latency that might beinvolved in routing through a second region. In a contrasting situation,if the communication of a first endpoint necessitates particular mediaprocessing not available in the first region, a communication flow maybe established with a second region. Additionally, an application can beconfigured with any suitable logic. For example, a call may beresponsive to a new connection to an endpoint, to one of two endpointshanging up, to initiating media processing (e.g., audio recording,transcription, or DTMF detection), or to sending an out of streamcommunication (e.g., SMS or MMS) and the like. The media and thesignaling channels may be routed independently according to particularrequirements. Depending on the state of the communication and the mediaservices acting on the communication, various components may bemaintained in the signaling channel. For example, thecommunication-processing server may be maintained in the signaling routewhile the media route does not pass through the remote region, which canenable the communication-processing server to respond to events andredirect media as required.

Dynamically directing the signaling and media of the communication caninclude selecting the media, which functions to determine the networkpath. Generally, the selected media path includes the media resourcesrequired to fulfill the functionality requirements. The determinationand selection of the media can additionally be made according to thecommunication quality impact of routing through that media resource.Communication quality can depend on latency, but other factors such asresource capacity, resource operational cost, and other suitable factorsmay be considered. In many cases, media resources closer in geographicaland/or in network topology are preferred over media resources moreremote. Accordingly, if a media resource is available in a region localto the endpoint(s) involved in the communication, then that mediaresource is selected. If a media resource is not available, then themedia resource used is outside of the local region. In one variation, acore media resource in a core remote region may be used. In anothervariation, a second local region (serving a different area) may be used.

Block S232, which includes selectively routing media communicationexclusively through communication resources of the first region if mediaresources to execute the processing instructions are available in thefirst region, functions to route communication within a region. Theresources of the region are preferably sufficient to support the currentstate of the communication session. In a preferred variation, the mediacommunication is exclusively routed through the communication resourcesof the first region for calls to other endpoints in the region. In onevariation, a media resource in the platform actively manipulates themedia communication. In this variation, a single endpoint may connectsuch as when an endpoint has a text-to-speech media server or a mediaplayer plays audio for the connected endpoint. In another variation, themedia resource is an ancillary media resource that transparentlymonitors and operates on the media. In both variations, multipleendpoints may be part of the communication session

In the variation with multiple endpoints, Block S232 preferably includesa communication-processing server inviting a second gateway, the secondcommunication gateway inviting a second endpoint accessible through aprovider service of the first region, and the communication-processingserver re-inviting the first and second communication gateways toestablish media communication flow between the first and secondendpoints. The communication is also directed away from thecommunication-processing server of the second region. As a slightvariation, the media communication flow may even be established to flowdirectly between the first and second endpoints without passing througha gateway of the first region. The first and second endpoints can bePSTN-based endpoints, SIP based endpoints, RTP based endpoints,endpoints accessible through a proprietary IP protocol (e.g., 3^(rd)party communication app), or any suitable endpoint. An endpoint ispreferably any addressable communication destination, which may be aphone, a client application (e.g., desktop or mobile application), an IPbased device or any suitable communication device. The endpoints can useany suitable protocol and the first and second endpoints mayadditionally use different communication protocols or mediums.

Additionally or alternatively, routing media communication exclusivelythrough communication resources of the first region may includeselecting a media resource of the first region to facilitate the mediacommunication flow. In some cases, select media resources may bedeployed/implemented in the first region. When the current communicationmedia stream transitions to a state where it requires only the mediaresources of the first region, the media communication flow willpreferably utilize the media resources of the first region, rather thanthose of the remotely located resources in the second region. Forexample, an application may initiate a media recording instruction. If arecording resource is in the first region, the communication gateway maydirect communication flow to go to the local recording server as opposedto a recording server in a different region. In another example, a mediatranscoding server may be accessed to transcode media for two endpoints.Two endpoints may use different media codecs that are not compatible.The transcoding service will preferably be added as an intermediary inthe communication flow so that the media can be transcoded with lowlatency.

The method may include querying a routing policy service for a selectedcommunication route, which functions to dynamically select acommunication route. The routing policy server can use the current stateof the system, individual regions, individualresources/services/components of a region, application state, or anysuitable parameter as an input. In one variation, the routing policyservice is substantially statically defined. A set of rules and/orarchitecture configuration may be used to select the routes. In anothervariation, the routing policy service performs an analysis and selects aroute that has statistical indications to be an optimal route based onthe analysis. In the case of rerouting to augment the included mediaresources, the routing policy service preferably selects a routeaccording to functionality requirements and the availability. Thefunctionality condition preferably determines what media resource orresources are capable and required for the communication session (e.g.,recording media, text to speech, transcoding, etc.). Availabilitypreferably evaluates what regions have the media resources, the qualityof service they can provide, and what is the capacity/availability ofthose media resources. The routing policy server is preferably queriedby the communication-processing server to select communication gateways.The routing policy server may additionally or alternatively be used bythe communication gateway to select a communication-processing server inblock S220. There may be one canonical routing policy server or multiplerouting policy server instances may be established in multiple regions.

Block S234, which includes selectively routing media communicationthrough at least the communication-processing server if media resourcesare not in the first region, functions to route communication betweenthe first and second regions. This selective option is preferably takenwhen the resource needed or preferred for handling the communicationsession is not within the local region (i.e., the first region). As withthe initiation of a call, the communication gateway preferably initiallyconnects to a communication-processing server. As was mentioned above,this default behavior may not be taken if the next state of thecommunication is known without accessing the communication-processingserver. Additional resources within the second region may additionallyor alternatively be used with the communication-processing server. Forexample, media resources such as recording service, text-to-speechservers, transcoding servers, transcription/speech recognition servers,and/or any suitable media resource may be implemented in the secondregion and may act on the media communication flow.

As mentioned above, the directing of the communication can dynamicallychange. The method may additionally include re-establishingcommunication with the communication-processing server upon a secondendpoint terminating the media communication flow S236 as shown in FIG.5. Block S236 can function to enable the communication to recover aftercommunication flow has moved away from a resource of the second region.As mentioned, the second region preferably includes acommunication-processing server that can be configured for processingapplication state of a communication session. Since thecommunication-processing server may not be in the communication flowwhen two endpoints are connected, a communication gateway in the firstregion will preferably re-invite a communication-processing server andreestablish communication flow between the first endpoint and thecommunication-processing server. For example, two callers may be talkingin a first region. When the callee hangs up, the first caller may beconnected to a call router in a second region that can play text tospeech audio or perform any suitable application action. Thecommunication flow can be redirected any number of times.

As shown in FIG. 6, the method may additionally be expanded such thatcommunication flow may be directed between any suitable number ofregions. In an exemplary implementation, there may be at least two baseregions in the US, with globally diversified local regions such as onein Europe, one in Asia, and one in South America. These regions maydynamically route communication based on an optimal or preferred route.The preferred route may be based on substantially static configurationof the different regions (e.g., how many resources are in each region),but may alternatively be based on quality metrics such as latency,quality of service reports, or any suitable metrics.

Example Implementations

As shown in FIG. 7, one example implementation of the system and/ormethod of the preferred embodiment can include a telephone call betweena pair of PSTN telephone users. Those of skill in the art will readilyappreciate that the following description is of an exemplary setting ofthe system and/or method of the preferred embodiment and does not limitthe claimed invention to any particular aspect or feature describedbelow. As shown in method 300 in FIG. 7, block S300 can includereceiving a call invitation at a first communication gateway X1 from afirst user's POP (point of presence provider or in other words aprovider server). As noted above, FIG. 7 illustrates a single use casein which the desired communication is between two PSTN users.Accordingly, the content of block S300 can include an invitation for avoice call identifying both the media (voice) as well as the desiredendpoint (phone number to which the call is directed).

In block S302, the first communication gateway preferably performs anynecessary authentications, security checks, verifications, and/orcredential checks for one or both of the caller and the recipient. BlockS302 can additionally include looking up and/or identifying a targetuniform resource identifier (URI) for the invitation, which designatesthe next destination for the transmission, i.e., the suitable regionalcommunication-processing server H1 for the request. As shown in FIG. 7,upon receipt of the request at the server H1, the server H1 responds tothe communication gateway X1, which in turn propagates the response backto the POP (point of presence) service (e.g., the provider service) inblock S304.

In block S306, the server H1 downloads and/or retrieves the TwiML basedon the URI associated with the dialed number (which corresponds to anaddress in one variation of the preferred system and method).Preferably, block S306 can further include determining if there is anymedia associated with the session. Preferably, the existence orrequirement of a particular media can be determined with reference tothe TwiML, which can contain predefined actions or verbs. Suitableactions or verbs can include dialing a number, saying text to thecaller, sending an SMS message, playing an audio or video file, gettinginput from the keypad, recording audio or video, connecting the call toanother browser client or device, or any other suitable type or media ofcommunication. In the example implementation, the TwiML would containthe “dial” verb, which requires media. Following a series of mutualacknowledgements, the transmission of media is opened up between the POPand the server H1 in block S306.

As shown in FIG. 7, the example implementation can include block S308,which includes determining an optimal route for the media at the routingpolicy server. Preferably, block S308 is performed substantiallysimultaneously with the series of acknowledgements performed in blockS306. Preferably, the policy server 50 optimizes traffic flow inresponse to one or both of the types/number/location of the endpoints(browser, VOIP, PSTN, mobile/cellular) and the type of media (voice,video, text, multimedia) used in each communication. As noted above, therouting policy server preferably receives input/s from one or both ofthe communication gateways X1 or X2, for example in the form of RTCPsender and receiver reports, which enables the routing policy server todetermine in real time or near real time the current status of each ofthe communication gateways X1 and X2, and in turn to select an optimalcommunication gateway X2 for the proposed call. Here optimal is used toindicate an algorithmically probable best route. As shown in FIG. 3, theserver H1 requests the optimal route from the policy server in blockS308. Additionally or alternatively, the routing policy server canreceive from each communication gateway XN a live quality of servicereport from which the policy server can determine the current optimalroute for any pending sessions.

As shown in FIG. 7, once the policy server determines the optimal route(i.e., a second communication gateway X2), it will return theappropriate URI to the server H1 so that the server H1 can communicatedirectly with the second communication gateway X2. In block S310, theexample implementation can include a series of requests, invites, andacknowledgements between the server H1, the second communication gatewayX2, and the second POP destination of the call recipient. Uponestablishing the second leg of the communication session, block S312 caninclude checking the two endpoints (via first and second communicationgateways X1 and X2), and then permitting media to flow between the firstand second communication gateways X1 and X2 in block S314.

Preferably, the server H1 is not involved in the media flow of blockS314. Accordingly, another example implementation can include detecting,at each of the first and second communication gateways X1 and X2,whether each respective side of the session has timed out for somereason. In response to a timeout at the first communication gateway X1,the first communication gateway X1 will alert the server H1, which inturn will hang up both the caller side and the callee side of thesession. Alternatively, if it is the second communication gateway X2that times out, then the server H1 can be configured to only terminateor hang up on the callee side in the event that there are more actionsor verbs to execute on the caller side.

The foregoing example implementation illustrates one aspect of thepreferred system and method using a single dial verb between two PSTNusers in a telephony system. However, the preferred system and methodcan be readily configured for any suitable combination of verbs, usertypes, and media types found in a cloud-based communication networksystem. Some example alternative implementations can include usage ofthe say verb, the hang up verb, the gather verb, either alone or incombination with the dial verb described above.

As shown in FIG. 8, a second exemplary implementation of the systemand/or method of the preferred embodiment can include video streamingbetween two mobile devices. In this example, client mobile or browserdevices may connect directly to communication gateways X1 and X2. Thisvariation functions in a substantially similar manner to the aboveexample but may vary in communication medium/protocols and user devices.In this variation, block S400 may include receiving a video invitationat a first communication gateway X1 from a mobile device. Alternatively,a video invitation may be received at a first communication gateway X1from a POP. Blocks S402, S404, S406, S408, S410, and S412 aresubstantially similar to steps S302, S304, S306, S308, S310, and S312except in implementation differences accommodating for video streamingand direct connection of the mobile devices to the communicationgateways. These blocks preferably establish two legs of a communicationsession such that video can flow between the first and second mobiledevice in block S414.

As shown in FIG. 9, a third exemplary implementation of the systemand/or method of the preferred embodiment can accommodate a dialfollowed by a text-to-speech command. This is preferably an extension ofmethod 300 above, where a user handing up re-invites between thecommunication-processing server and the communication gateway can occurmultiple times throughout the lifetime of a call. A communication willpreferably be initialized as described above so that media communicationflows between two endpoints of a first region. One of the endpointshangs up causing a SIP BYE signal to be sent to a second communicationgateway (X2). X2 then propagates the BYE to the communication-processingserver (H1) in the second region. The H1 in this scenario will evaluatethe application instructions. If more instructions exist within theapplication, then the H1 can re-invite the first endpoint to bring mediacommunication flow back to the H1 The H1 re-invites the firstcommunication gateway (X1), a 200 OK reply is received, anacknowledgement signal is delivered, and media communication will onceagain flow between X1 and H1. In this variation, the next communicationinstruction is to play text-to-speech audio. The H1 will preferably callout to a TTS service to download or access the audio, and then the H1will stream the media to the X1 and the X1 will stream the media to thefirst endpoint. In an alternative version, the H1 may instruct the X1 toperform the TTS operations or to use a TTS service of the first region.

As shown in FIG. 10, a fourth exemplary implementation of the systemand/or method of the preferred embodiment can accommodate a say followedby a dial. A caller form a first region dials in and is invited to a H1via a communication gateway X1 as in the initial portion of method 300.Once the call has been established, the H1 preferably downloads oraccesses the communication platform with the communication instructions.In this particular example, the instructions include a say instructionfollowed by a dial instruction. The H1 will contact a TTS server andplay the media. After the media of the ITS has completed, the H1 willpreferably continue to execute the communication instructions and willthus execute the dial instruction. If the dial instruction is to anendpoint in the first region, the second endpoint will be added to thecommunication flow in a manner similar to that in 300.

As shown in FIG. ii, a fifth exemplary implementation of the systemand/or method of the preferred embodiment can accommodate hanging up acall on a detected input. In this example, the detected input will bethe DTMF input of a star (*). A user presses star when they are ready toend a call. An RTP event is sent to the provider service, which is thendelivered to X1. X1 will initiate a hang up of the other party. To hangup, a re-invite signal is sent to the H1 with an action header that asksthe communication processing service to hang up the other side. The H1then issues a BYE sequence to the second endpoint through the X2 andcontinues executing any remaining application instructions. In analternative implementation shown in FIG. 12, X1 delivers the RTP eventto X2, which initiates the hang up process. X2 signals the end of thecall and ends communication with the H1. H1 will then re-invite X1 orhang up depending on the state of the communication platform.

A sixth exemplary implementation of the system and/or method of thepreferred embodiment can accommodate timeout scenarios on the caller orcallee side. Each communication gateway is preferably responsible fordetecting timeouts for their respective leg of the communication. Asshown in FIG. 13, the caller side X1 may detect a timeout scenario whenthe caller endpoint stops sending RTP for a configurable amount of time.X1 then signals the H1 to notify that a timeout has occurred. The H1will preferably hang up/terminate the caller side and the callee side.The BYE signal preferably includes a header that specifies the reasonfor the termination (e.g., an RTP timeout). As shown in FIG. 14, thecallee side X2 may detect a timeout scenario when the callee endpointstops sending RTP for a configurable amount of time. X2 signals theerror to the H1 and the communication flow is terminated for the callee.As there may still be application instructions that can execute for thecaller, the H1 preferably executes any remaining instructions oralternatively terminates communication with the caller.

One or more aspects of the example embodiment can be configuredpartially or entirely in a computer-readable medium storingcomputer-readable instructions. The instructions are preferably executedby computer-executable components preferably integrated with one or moreAPIs, servers, routing policy servers, POP servers, and/or communicationgateways. The computer-readable medium can be stored on any suitablecomputer readable media such as RAMs, ROMs, flash memory, EEPROMs,optical devices (CD or DVD), hard drives, floppy drives, or any suitabledevice. The computer-executable component is preferably a processor butthe instructions can alternatively or additionally be executed by anysuitable dedicated hardware device.

System of Global Media Resources

As shown in FIG. 15, a system for processing communication media in aregionally distributed communication platform of a preferred embodimentfunctions to enable communication media services within a local region.When deploying a communication platform across geographically diverseregions, some services can benefit by having low latency interactionswith real-time, synchronous communication. In addition to providing themedia services with low latency, the system enables a platform toprovide consistent data across the platform. This is beneficial formaintaining consistent API resources. For example, recordings generatedin local regions will be available through an API. The method ispreferably used in combination with the system and methods describedabove. The system preferably includes the elements described above forat least two regions. A first region (a local region) preferablyincludes a plurality of provider services, communication gateways andsupplemental media services. The second region (the remote region)preferably includes at least a communication-processing server and anyadditional resources, services, or components. The remote regionpreferably includes more resources and services. The remote region caninclude a core media service, which may be the same as the supplementalmedia service, but may additionally provide additional functionalitysuch as synchronizing with an API sub-system. For example, API mediaresources are preferably stored and maintained in the remote region inan API sub-system.

The system and method can be used with any suitable media resource orresources that may benefit from being deployed to local regions. Themedia resources are preferably configured as a media services. A mediaservice can be easily deployed in a local region and operateindependently and consistently integrate with other regions, such as theremote region where API resources and state is maintained. A mediaservice preferably has a defined interface and manages its own highavailability load balancing, scalability, redundancy, and other serviceoriented orchestration considerations. Storage and state can preferablybe maintained internally within the media service. For example, adatabase used to manage the service orchestration of the media servicecan be kept internally and may, at least in part, not be shared outsideof the service. Information, records, and data that is to be sharedoutside of a media service, is preferably distributed across regions forother services to consume. The media service may include a media serviceAPI to facilitate access and integration of the media service with otherservices and components of a communication platform. Media services arepreferably composed of components or computing resources. The componentscan be software libraries or other services (e.g., a mini-service). Thecomponents preferably perform a specific task. Some of these components,which facilitate a particular feature of a service, may or may not beactivated or included in a locally deployed media service. For example,for a recording service, transcription may or may not be an includedcomponent. Multiple media services may be implemented within a localregion, and the media services may target a variety of communicationfunctions. A media service may be a recording service, a text-to-speech(TTS) service, a speech recognition service, a transcoding service, aninput detection service, answering machine detection service, aconferencing service, a communication queuing service, and/or anysuitable media service.

Two preferred varieties of media services include passive media servicesand active media services. A passive media service is a media servicethat acts on the media asynchronously to the media communication pathconnected to an endpoint, and more specifically, the passive mediaservice immutably operates on the media of the communication session—themedia of the communication session is immutable to the operations of thepassive media service. Duplicated copies of the media, stored versionsof the media, or other secondary instances of the media may bereasonably mutable by a passive media service, wherein secondaryinstances of the media (e.g., a branch or tunnel) can be processed oraugmented in any suitable manner asynchronous to the primary mediacommunication route of the communication session. In other words, themedia service preferably does not substantially impact the latency ofcommunication of the media communication with an endpoint. A passivemedia service may process the media after or independent of mediacommunication routing; the passive media service may asynchronouslyrelay a branch of the media to another resource; or the media servicemay otherwise operate on the media in an immutable and asynchronouslymanner. A recording service preferably temporarily stores media and thentunnels the media asynchronously (i.e., independent of the media paththrough the recording service). The media communication routed throughthe media service is preferably not mutable by the recording service.Some passive media services may contribute some latency to thecommunication stream, but this is preferably independent of the latencycaused from tunneling the media. A speech to text transcription servicemay generate text from spoken text asynchronous to media passed throughthe service. An active media service preferably acts and may modify themedia in the media communication with an endpoint. An active mediaservice may generate media (e.g., a ITS service), mix media (e.g.,conferencing service), and translate/transcode media (e.g. transcodebetween media codecs and/or mediums). The media communication ispreferably mutable. In other words, an active media service mutablyoperates on the media by altering or augmenting the state of the mediacommunication of the communication session (e.g., the media orrepresentation of the media can be altered). A media service mayadditionally provide passive and active functionality as a single mediaservice, such as a ITS service with recording capabilities.

Recording services preferably enable recording of calls or communicationsessions that are routed through communication gateways within the localregion. This avoids routing media communication flow through a remoteregion to access a recording resource. Recording is preferably for audiorecording, but may additionally or alternatively include videorecording, screen-sharing recording, multimedia recording, or anysuitable recording service. The recording service may have additionalfeatures that may or may not be integrated into the recording service ofthe local service. Transcription is one preferred feature of therecording service. Transcription may use algorithmic speech recognitiontechniques, automated manual transcription, semi-automated techniques,and/or any suitable approach. The audio recording files, the meta dataof the recording (e.g., timestamp, time duration, audio quality andformat), and/or the recording transcripts are preferably synchronizedwith a remote region. As shown in FIG. 17, a recording servicepreferably includes a recording component, a transcription component,and at least a storage component. The recording service additionallyincludes communication interfaces with a communication-processing server(e.g., a call router), API, and the resources of one ore more regions.

The recording component is preferably responsible for taking a stream(audio, video, etc.), manipulating the stream (e.g., trimming offsilence, transcoding it to a different format/codec, etc.,) and writingthe recording to a file. Inputs for the recording component may includethe audio stream, the file name, and/or arguments for trimming, fileformat, recording quality, volume adjustment, and/or any suitableparameter of the recording. Outputs of the recording componentpreferably include an audio stream saved as a file, meta data such asthe duration of the saved audio file, and size of the file. Thetranscription component can include inputs such as the audio stream,transcription arguments, an HTTP callback to call when transcription iscomplete, and/or any suitable parameter. The transcription arguments mayinclude the accuracy level of the transcription (e.g., level ofservice), language of transcription, and/or any suitable variable of thetranscription process. The transcription component preferably outputsthe text of the stream. An interface of the recording service preferablyabstracts away the inner-workings of the components of the recordingservice. The interface of the recording service uses inputs of arecording ID, an audio stream to record, and/or a HTTP callback to callafter complete. In one variation the HTTP callback is called aftertranscoding of the recorded file is complete. Other inputs andparameters may additionally or alternatively be exposed of the recordingservice. Additional inputs may include transcription inputs such as if arecording should use transcription and the parameters of thetranscription. The recording service interface preferably outputs a URIor alternative resources address of a recording, parameters of therecording (e.g., duration of the recording, timestamp), and/or fileparameters such as file size.

A Text-to speech service preferably generates, plays, and/or convertstext into audible speech. The audible speech is then played within acommunication stream. For example, a phone call may connect to atelephony application that specifies a script that should be read to thecaller. The script is preferably directed to the TTS service to beplayed during the phone call. The text-to-speech services are preferablyfor audio communication. However, a computer generated video simulationor rendering of a speaker may additionally be created for videocommunication. The text-to-speech service preferably takes text as aninput and outputs an audio stream and/or an audio file as an output. Theaudio file may be cached internally within a local region implementationof a media service. The audio file of a TTS request may additionally besynchronized with a TTS cache of a remote region.

A speech recognition service is preferably a service used in collectingspoken input and converting it into a format for transcription, naturallanguage processing, or interpretation of responses. The speechrecognition may use the transcription component described above, but mayalternatively use an alternative approach. The input to the speechrecognition is preferably an audio stream and parameters of speechrecognition. Parameters of speech recognition may include expectedlanguage of speech. In one variation, the speech recognition service isused to detect or identify categories of responses. For example, thespeech recognition may be used to identify a number with a set number ofdigits, to identify particular key words, or classes of responses. Inone example, classes of responses may include a confirmation class and acancel/deny response. The output may be the interpretation of thespeech. In one variation, an HTTP callback may be specified where theoutput may be posted after speech recognition is completed. In anothervariation, the speech recognition service may work in cooperation withthe recording service. Alternatively, a speech recognition component maybe integrated into the recording service, an input detection service,and/or any suitable service.

A transcoding service functions to convert between formats. Thetranscoding may convert an active media stream to another format. Forexample, a call with two endpoints may natively use two differentcodecs. The transcoding service may convert one or two of the legs ofthe communication to a common or compatible media stream format.Additionally, the transcoding service may work to convert accessed mediaresources that are or will be used in a communication session. Forexample, an MP3 file accessed from a URI may be converted to a wave filefor playback during a phone call. The transcoding service preferablyaccepts a media stream in a first format and outputs a media stream in asecond format. The transcoding preferably is used on communication thatflows within the local region. The transcoding service may additionallybe used if communication flows between two different local regions (asopposed to including a third remote region just for the transcodingservice).

An input detection service functions to gather inputs of a communicationdevice. Preferably the input detection service collects DTMF inputs froma user. In the DTMF input detection variation, an audio stream andparameters of detection are preferably an input to the service.Parameters of DTMF detection can include timeout, a key to finishdetection on, number of digits, a callback URI to call after input iscaptured, and/or any suitable input. As an additional service, ananswering machine detection service may be used to identify an answeringmachine. The components of an answering machine detection service mayalternatively be integrated into the input detection service or anysuitable service.

Conferencing services preferably facilitate calls with more than twoendpoints connected. Various features of conference calls may be enabledthrough components of conferencing services. Additionally, aconferencing service may generate accessible API resources that can beused by applications to programmatically query and modify aspects ofin-progress or past conference calls. The API resources are preferablystreamed or transmitted to a remote region where consistentrepresentations of API resources are managed for a platform. Thispreferably functions to make API resources to be regionally/globallyconsistent despite media services handling communication processingwithin a local region. For example, a conference call may be in progressin Europe. The communication is preferably routed between multipleEuropean endpoints, possible communication gateways facilitating thesignaling, and a conferencing service in the European region. Data forconference call API resources is preferably communicated back to aremote region that is used in managing the API resources. Now if anapplication anywhere in the world queries for the in-progressconferencing resource and modifies the resource, that occurs on aplatform consistent version of the API resource. The synchronouscommunication preferably avoids increased latency that may occur if thecommunication was routed to a remote region to a conferencing service,but the API resources used to programmatically interact with theconference call are maintained consistent in the platform.

A communication queuing service functions manage phone queues or, inother words, communication holding lines. Similar to the conference callabove, API resources for querying and managing a call queue may beaccessible within the platform. The data to support such API resourcesis preferably synchronized with the platform services and components ina remote region.

A core media service functions to provide functionality of the mediaservice in a central or core region. The core media service may be asuper-set of media processing features than those of a local region, butmay alternatively provide substantially identical media processingfunctionality. A core media service can preferably coordinate with alocal media service in synchronizing API media resources. For example, arecording media service may locally temporarily store a copy of themedia in the local region in case a failure occurs in communication withthe remote region. Then the media communication is streamed or otherwisecommunicated to the core media service to synchronize with the APIsub-system. The API sub-system preferably includes the API services tosupport processing API calls. The API sub-system additionally includesmedia storage systems. In the recording example, a copy of the recordingis preferably stored in some media storage solution such as a cloudhosted simple storage solution.

As mentioned above any suitable services may be implemented within alocal region. The media services used within a local region depend onthe use-case of the communication platform. While any of the above mediaservices or suitable alternative media services may used, the belowmethod primarily uses a recording service as an exemplary media servicebut any suitable media service may additionally or alternatively beused.

Method of Global Media Resources

As shown in FIG. 22, a method for processing communication media in aregionally distributed communication platform with at least a subset ofresources in a first region and a subset of resources in a second regionof a preferred embodiment can include at the first region, establishinga communication session; triggering modification of the mediacommunication comprising identifying a media resource to facilitatemodification to the communication session, wherein the media resource isidentified according to functionality and availability in at least thefirst and second regions; and dynamically directing signaling and mediaof the communication. The method preferably functions to improvecommunication quality in regionally distributed communication platforms.In integrated communication platforms, infrastructure may need to bephysically present in different regions to support requests associatedwith the region, however, the capacity, availability, and functionalityof media resources may be asymmetric across all regions. That is to saythat the resources in one region may be different in a second region. Ina preferred implementation, there may be one or more central regionsthat include a larger set of resources than local regions, which mayfunction to support communication in that region.

As discussed herein, establishing a media communication can includeestablishing a media communication and a signaling communication.Furthermore, at the communication session includes at least oneconnection to an endpoint, but may support multiple endpoints, which maybe associated with the same or different regions.

Additionally, dynamically directing signaling and media of thecommunication preferably includes routing media communication outside ofthe first region if the selected media resource is outside the firstregion, and routing media communication through the media resource ofthe first region if the media resource is available in the first region.The method preferably selects media resources according to communicationquality. Communication quality preferably includes communication latency(which may be impacted according to regional association of mediaresources), post dial delay, jitter, cost to platform, cost to customer,and/or any suitable quality metric.

The method can preferably establish regional communication routingaccording to various modes of communication network topologies. The useof active media resources can preferably include any suitable mode ofcommunication network topology (e.g., routing media within a singleregion, accessing an active media resource external to the regionassociated with the connected endpoints, routing through multipleregions when endpoints connect in different regions, and other suitablescenarios). In the case of passive media resources, branches of themedia communication can be transmitted or tunneled to media resources ofother regions. Additionally, various combinations and variations of thecommunication topologies can be dynamically generated in response todifferent passive and/or active media resource requirements.

As shown in FIG. 16, a service for processing communication media in aglobal of a preferred embodiment can include providing a communicationprocessing platform with components of at least two regions S510,routing communication to at least one media service of the local regionS520, tunneling a media stream to the remote region S530, and storingthe data of the media service S540. The method functions to enablecommunication media services within a local region. When deploying acommunication platform across geographically diverse regions, someservices can benefit by having low latency interactions with real-time,synchronous communication. In addition to providing the media serviceswith low latency, the method enables a platform to provide consistentdata across the platform. This is beneficial for maintaining consistentAPI resources. For example, recordings generated in local regions willbe available through a global API. The method is preferably used incombination with the system and methods described above.

Block S510, which includes providing a communication processing platformwith components of at least two regions, functions to dynamically directcommunication traffic between two regions. The provided communicationprocessing platform is preferably substantially similar to the systemand methods described above. Communication can preferably be routedwithin a local region if resources are available in that region orcommunication can be routed between at least a local and remote regionto use the resources used during a communication session. Providingcommunication processing platform may include initializing signaling andmedia communication flow as described above. The subsequent steps beloware preferably used in the context where the media communication flow isestablished within a local region. In other words, media communicationflow is from at least one endpoint through a provider service of a firstregion and to at least a communication gateway. A one legged variationwhere only one outside endpoint is connected preferably uses at leastone media resource to act as the other endpoint (e.g., play audio and/orcollect input). Other variations, preferably involve a communicationsession having at least two outside endpoints connected. Thecommunication route preferably is from a first endpoint through aprovider service to a first communication gateway to a secondcommunication gateway and then through a provider service to the secondendpoint. Any suitable number of endpoints may additionally beconnected. Additionally, communication is additionally routed to a mediaservice as described below in Block S520.

Block S520, which includes routing communication to at least one mediaservice of the local region, functions to incorporate a media servicewith active communication. The media service may also be provided by aremote service as well as a local region. A benefit of using the mediaservice of the local region is that latency issues, quality of service,and other issues may be avoided by containing communication flow withina local region. A media service is preferably activated by acommunication-processing server (e.g., a call router) of a remote regiondeciding that a media process should be used. Thecommunication-processing server preferably signals to the communicationgateway of the local region to inform the communication gateway that itshould use, activate, or enable the media service. Preferably the signalis sent through a SIP control channel using SIP INFO. Additionally, somerecord within the remote region may initially be created by thecommunication-processing server. The record may be used in creation ofan API resource or for internal logic of the remote region. The recordis preferably stored in a database or some other suitable storagemechanism. In initializing the record, some information such as aresource ID or secure ID may be automatically generated before a mediaservice is notified. Record information such as account information,media resource ID, and other instructions may be included in the signalcommunication to the communication gateway in the local region. Forexample, if a call router encounters an instruction to record audio. Thecall router preferably creates a recording resource in the remoteregion; transmits a SIP INFO signal to a communication gateway managingthe endpoint in a remote region, wherein the SIP INFO also includesrecording instructions, the resource ID and account information.

The communication gateway preferably activates the media resource byconnecting the communication stream to the media service. Depending onthe type and use-case of the media service, the media service may be anintermediary service, a side service or an endpoint service. As anintermediary service, the media communication flow passes through themedia service. This may include a transformation of the media streambetween different legs of the communication. For example, a transcodingservice may convert the communication stream to a common compatiblemedia format. A side service is preferably an passive or ancillaryservice that has a communication stream pushed to the media service. Thecommunication stream maybe transmitted asynchronous to the mediacommunication connected to the endpoint. As being transmittedasynchronously, any latency or delays in the media transmission ispreferably independent of such issues with the communication qualityexperienced by connected endpoints. The media service may be passivelyobserving the communication stream such as in the case of a recordingservice. The media service may alternatively actively interact with thecommunication stream such as if an input service signals thecommunication gateway that an input event was detected. The mediaservice may additionally be a communicating endpoint of thecommunication session. For example, a media service for playing audiofiles and/or performing speech recognition may act as one leg of a phonecall. In the case of a recording service, the two streams of a mediacommunication are preferably merged and pushed to the recording resourceover HTTP. The stream is additionally stored in local disc of the localregion. The local disc storage functions as a backup in case of failure.In one variation, the media service of the local region is implementedas a static proxy of the media service and the media stream is tunneledfrom the static proxy to a service proxy and media service of a remoteregion as shown in FIG. 16. A static proxy of a media service mayprovide temporary storage or processing capabilities. Long terms dataand more complicated asynchronous processing of a media service may bekept within remote regions. The static proxy preferably runs a servermode tunnel service (e.g., stunnel) and a load balancing service.

Block S530, which includes tunneling a media stream to the remoteregion, functions to transfer data for persistent storage in the remoteregion. Tunneling to the remote region is preferably used to updaterecords in the remote region. There may be several ways to accomplishthis. A first variation include tunneling of a media stream may includeestablishing VPN proxies that function to get around firewalls. Afirewall for HTTP is preferably opened to enable servers of the localregion push media streams to media services of the remote region. Asdescribed above, service proxy servers may be implemented within theremote region to receive incoming SSL-encrypted connections from localregions, terminate the SSL, and forward requests to an appropriate mediaservice of the remote region. Another variation may include cuttingdatabase dependence of a media service and promoting a resource of theremote region to update the database. Data generated in the mediaservice is preferably streamed from the local region to the remoteregion. In one variation, an existing SIP channel may be used as thesignaling and media channel for streaming media to the remote region.Special handling of SIP failures or media processing failures may usedto ensure updating of the database. Another variation would be to openup firewalls for the databases with records used by a media service.Measures are preferably with the communication link between the regionsto avoid a security risk of opening up firewalls for the databases.

Block S540, which includes storing the data of the media service,functions to store the data of the media service in a consistent andaccessible manner. The data is preferably stored within a remote regionthat is used at least in part as a core, central, or main sub-system ofthe platform. The remote region will preferably be a region where atleast part of state data of the platform is kept. There may need to benumerous local regions deployed to service different geographic regions.However, replicating and making the data consistent across each regionincreases complexity and cost of the platform. A subset of the regions,possibly even one or two regions, is preferably used as the centralregion where persistent data is stored. The persistent data may be usedwithin logic of the platform or alternatively used as accessibleresources available through an API, user interface, or other suitableinterface. Once the data from the media service of the local region hascompleted, the communication-processing server will preferably signalback to the local region over the signaling control channel to stop therecording. Alternatively, a media service in may signal to thecommunication gateway, which may contact a component of the remoteregion to indicate that the storing of the persistent data is complete.While storing of persistent data is used for some media services, somemedia services may not generate persistent data that requires storingoutside of the local region.

As shown in FIG. 16, an implementation of the method may include mediacommunication being established within a local region as describedabove. A call router of a remote region may determine that a call shouldbe recorded. To initiate recording, the call router creates a newrecording record in a database, and uses SIP as a control channel tosend a SIP INFO signal to a communication gateway in the local region.The SIP INFO preferably includes information of a recording request suchas the account name and recording record secure ID. The communicationgateway then merges streams of an active call within the first regionand pushes the merged media stream over HTTP. A temporary or cachedversion of the recording may be stored locally. A static proxy componentpreferably uses the host header and pushes the stream to a serviceproxy. The service proxy is preferably configured to listen for changesin platform orchestration to determine the load balancing and mediaresources available.

Method for Managing Communication in a Distributed Communication Network

As shown in FIG. 18, a method for managing communication in adistributed communication network of a preferred embodiment can includeproviding a communication platform with resources in at least tworegions S610; initializing a communication session with a connection toat least one endpoint S620; associating the first endpoint with a firstregion S630; determining a communication route topology S640; andestablishing the communication route topology S650. The method functionsto dynamically redirect communication traffic within communicationplatform for signaling and media. The method is preferably employed in aregionally/globally distributed communication platform that works withcommunication susceptible to latency and/or quality performance issues.The method is preferably used within a communication processing platformsuch as the telephony platform incorporated by reference above. Themethod may additionally or alternatively be used with videocommunication, client based audio communication (e.g., VoIP),screen-sharing applications, over-the-top (OTT) IP communications,and/or any suitable communication platform. As described above,replicating all components in different regions can be expensive andincrease complexity of a system. The method enables communication to bere-routed within different modes of routing topologies according torequirements and quality improvements for a particular communication.Generally, different regions will have different media processing and/orsignal control capabilities, and additionally, each communication mayfurther have different and changing media and/or signaling resourcerequirements. The method preferably provides capability to route mediaaccording endpoint regional association and resource capabilityrequirements of the communication session. More preferably the media andsignaling are both routed, and routed independently.

Block S610, which includes providing a communication platform withresources in at least two regions, functions to have a communicationplatform with at least two regions of resources. The different regionsare preferably substantially similar to the regions described above. Theregional centers are preferably hosted within distributed computingsystems based in particular geographic regions. The regions of thecommunication platform are preferably at least partially co-dependent,in that at least one or more resources are shared between the tworegions. In a preferred implementation, a central core region, willmaintain core resources such as communication-processing servers. Theremay be a single core region, which in one implementation maintains theofficial state information within the platform (e.g., maintains theconsistent source of API resource information for various accounts).There can additionally be multiple core regions. Synchronizing resourcescan be used to keep data and state of the core regions insynchronization. Local regions are preferably deployed to servecommunication requirements in particular geographic regions. The localregions may not include a full set of resources to handle allcommunication capabilities of the platform. Additionally, differentlocal regions may have different levels of communication capabilities.As described above, the local regions may additionally include localinstances of a resource that operate in cooperation with core regionalinstances of the resource. For example, a local recording resource mayfacilitate recording in the local region (avoiding latency issues),while tunneling the media to a core recording resource to store as anAPI resource. The regions can include different sets of media processingresources, signaling resources, storage/state information, platformservices (e.g., API servers, etc.), and/or any suitable type ofresource.

Block S620, which includes initializing a communication session with aconnection to at least one endpoint, functions to establish acommunication with at least one outside initiator or receiver of thecommunication. The initiated transaction may be transacted (e.g.,originated, terminated, or otherwise connected) with a PSTN provider, aSIP provider, a IP communication provider, client application, a WebRTCcommunication source, or any suitable communication provider.

In one preferred variation, the communication session is initiated froman incoming communication request. The incoming request may be receivedfrom a PSTN provider, a SIP provider, an OTT IP communication provider,a client application, a WebRTC provider or service, and/or any suitablecommunication provider. In the case of a client application, theincoming request from the client application may be an API request froma client endpoint (e.g., a mobile app used as a communication device).In the case of an incoming request, the calling endpoint is connected toat least one media endpoint (e.g., a TTS server) within thecommunication platform or alternatively to at least a second externalendpoint. The first, second, and/or optionally other endpoints may bethe same type of endpoint or may be different endpoints. A subset of theendpoints may be endpoints associated with the same region or,alternatively, different regions.

In other instances, the communication session may be initiated inresponse to an outgoing communication request. In this variation, thecommunication is established from the communication session, and willpreferably include calling out or inviting at least one externalcommunication endpoint. As with the inbound communication, the outboundcommunication may be between one endpoint and an internal media serviceor between at least two external communication endpoints. The outboundcommunication session may be initialized in response to an API request.For example, an account may make a REST API request to setup a callbetween two endpoints. The outbound communication session mayalternatively be in response to application processing, part of ascheduled event, or in response to any suitable trigger. In many cases,the communication session will be modified such that the involvedendpoints change during the session, preferably through merging incomingand/or outgoing communications. For example, an inbound call may beredirected to connect to another external endpoint; two inbound callsmay be merged in a conference; or outbound calls may be merged in aconference.

Block S630, which includes associating the first endpoint with a firstregion, functions to establish or determine a regional relationship ofinvolved endpoints. The endpoint is preferably associated with a regionaccording to regional information encoded in the endpoint (e.g., countrycode, area code, etc.) or otherwise associated with the endpoint. Anendpoint will preferably have a geographic proximity (or alternatively anetwork-based proximity) to at least one region. The endpoint ispreferably associated with the geographically closest region. In somecases, where the distance different between a local region and coreregional is negligible (e.g., less than 500 miles), then the associationmay be biased towards the region that better meets the communicationresource requirements. For inbound communications in particular, theregional association is preferably based on the provider resourcethrough which the inbound communication is received. For example, a PSTNprovider that serves a particular region is preferably configured tobridge communications to the communication platform in a designatedregion. Similarly, when making outbound calls, the area code or countrycode of an endpoint may be used to determine which region will be usedas a connection point to the endpoint. For example, all outgoing callsfor endpoints with addressing information associated with a particularregion may go through that particular region. Multiple endpoints mayparticipate in a communication session, and each endpoint can beindividually associated with a region.

A communication session can include one or more connected endpoints.Each endpoint is preferably associated with a region wherein block S630may be performed for multiple endpoints. Such region associations can bedetermined based on acquired metadata stored in association with theendpoint address. Additionally or alternatively, regional informationmay conveyed through the endpoint address such as in the country codeand area code of a phone number, or the domain name used in a SIPaddress. Such endpoint associations are preferably account for andimpact the determination of a communication route topology.

Block S640, which includes determining a communication route topology,functions to query, select, or otherwise determine how at least media isrouted within the communication platform. As the communication platformspans multiple regions, the media and/or signaling can be routed indifferent topologies depending on the communication requirements,regional association of the connected endpoints, and the regionalcapabilities. The communication route topologies preferably includewhich resource instances and which regions are used and how thecommunication is networked between them to connect the endpoints. BlockS640 preferably includes determining a communication route topologybased on the required resource requirements and the availability ofmedia resources in the regions. As discussed above, communicationresources may have different availability depending on the associatedregions. Preferably the communication route topology includes the mediacommunication route (i.e., how a real-time media stream is routed). Thecommunication route topology can additionally include a signalingcommunication route. The signaling and media communication can befacilitated by SIP, but may use any suitable communication protocol. Thesignaling route and the media route can be independent such that theroute of media can be different from the signaling route (even includingdifferent regions.

Determining a communication route topology preferably includesdetermining a route that provides improved communication quality.Preferably the communication quality minimizes communication latency.The communication quality preferably depends on media latency betweenconnected endpoints, but may additionally include other factors such aspost-dial delay, jitter, codec quality, platform cost, user cost, and/orany suitable parameter. In one variation, a network graph searchalgorithm is used to determine the route. In particular, aprovider-weighted network search approach can balance a set of differentcommunication quality properties such as the method described in U.S.patent application Ser. No. 14/209,152, filed 13 Mar. 2014, which isincorporated in its entirety by this reference. In an alternativevariation, various heuristics based on regional availability ofresources is used to default to the nearest resource.

Block S650, which includes establishing the communication routetopology, functions to register, negotiate, or otherwise setup thedetermined communication route topology. Establishing the communicationroute topology can include negotiating the setup of a media routethrough a path of the determined path. In a SIP variation, variouselements may resources may be invited or subscribe to the media stream.Additionally, media and/or signaling resources may be directed toperform various tasks in association with the communication session. Thepath will preferably connect the connected endpoint(s) and at least oneresource of the communication platform. Other instances may routethrough multiple resources, establish multiple media “branches”, andinclude various resources.

The communication route topologies can specify different modes ofoperation that are established in block S650. In a local mode, thetopology is maintained in the first region. The local mode is preferablyused when the resources are available within the region associated withthe endpoint(s) as shown in FIG. 19A. For example, if an endpoint fromNew York is calling an endpoint in Washington, then an Eastern regioncenter may fully manage the communication. In one variation, thecommunication may be between a first endpoint and a second endpoint,wherein the first and second endpoint are in different local regions. Ifthe communication resources are available in one of the two resources,then the communication may be routed through the two local regions asshown in FIG. 19B. In one variation, a region local to an endpoint canbe a core region as shown in FIG. 19C

In a remote mode, the topology is through a region outside of the firstregion. In the remote mode, at least one resource is used outside of theregion local to an endpoint. This can include any suitablemulti-regional topology. The routing of media through different regionsis preferably to access resources not available in the local regions ofconnected endpoints. In one instance of a remote mode, the topologyincludes a communication route topology connecting a segment of theroute in a first region connected to a first endpoint, a segment througha second region, and a segment in the first region connected to a secondendpoint as shown in FIG. 19D. This out-and-back route can be used toaccess a resource available in a particular region. The second region ispreferably selected according to the quality. For example, there may bemultiple regions that have the particular resource, but one particularregion may be selected according the route topology selection process.In a variation of this route instance, the third segment may be to thesecond endpoint in a second region as shown in FIG. 19E. In thisvariation, the first endpoint, the second endpoint, and at leastcommunication resource exist in different regions. In another instanceof a remote mode, the communication route topology may include onesegment connected to an endpoint in a local region, which is connectedto a second segment in a remote region. The second segment can beconnected to an internal media endpoint (e.g., a TTS server or mediaplaying server) as shown in FIG. 19F.

In hybrid mode, may include substantially serving the communicationsession with resources in a local region while creating a media branchto a remote region as with the recording example above and shown in FIG.19G. As shown in FIG. 19H, local routing, remote routing, and branchingof routes can be used to establish any suitable arbitrary media routing.

Communication signal route topology can be similarly be established inany of the suitable variations described above. In one variation,signaling and media are coupled. In another variation, signaling andmedia are distinct and can have different or identical paths as shown inFIGS. 20A and 20B.

Additionally, the method may include detecting a new resourcerequirement and updating the communication route topology S660, whichfunctions to transition the communication route topology according toresource requirements. In a communication platform, a communicationsession may have different resource requirements over the duration of asingle session. The communication route may be updated to use differentresources, which may result in the media and/or signaling route to havea different path through regions. In other words, the set of resourcesand the set of regions from one communication topology may be distinctfrom that of a second instance of the communication topology. Forexample, a first segment of a session may be simple bridging of multipleendpoints, another segment may require processing application logic ofthe communication session, and another segment may require the use of aparticular media resource (e.g., recording service). Each of thesesegments can have different resource requirements. The change ofresource requirements is preferably identified through the signalingand/or processing of application logic. When a new resource is required,the resource(s) are preferably identified, and then blocks S630, S640,and S650 are preferably substantially repeated to transition the mediaand/or signaling. Even if a resource was included in the previous route,a new instance of that resource in a different region may be used.Similarly, if resources are no longer needed, they may be removed fromthe route.

As a person skilled in the art will recognize from the previous detaileddescription and from the figures and claims, modifications and changescan be made to the preferred embodiments of the invention withoutdeparting from the scope of this invention defined in the followingclaims.

The invention claimed is:
 1. A method comprising: establishing, with acommunication processing server that is located in a first region, amedia communication session with a first endpoint of a second region,wherein the communication processing server is a server of acommunication platform system, wherein: a first media service that islocated in the second region processes media of the media communicationsession and generates data during the processing of the media, whereinthe first media service is a service of the communication platformsystem, wherein the first media service processes the media based on amedia processing instruction, and wherein the media is processed by thefirst media service independently of a latency caused by the generatingof the data, the second region implements at least one resource, for thefirst media service, that differs from resources implemented in thefirst region, the platform system stores the generated data in the firstregion as a first application programming interface (API) resource, andthe communication platform system is constructed to provide an externalsystem with access to the first API resource in the first region.
 2. Themethod of claim 1, wherein the first media service is a recordingservice, and wherein the generated data is recording data of the mediacommunication session.
 3. The method of claim 1, wherein the first mediaservice is a text-to-speech service, and wherein the generated data istext-to-speech data of the media communication session.
 4. The method ofclaim 1, wherein the first media service is a speech recognitionservice, and wherein the generated data is speech recognition data ofthe media communication session.
 5. The method of claim 1, wherein thefirst media service is an input detection service, and wherein thegenerated data is input detection data of the media communicationsession.
 6. The method of claim 1, wherein the media is real-time media,and wherein the communication session is a real-time communicationsession.
 7. The method of claim 2, wherein the media is real-time media,and wherein the communication session is a real-time communicationsession.
 8. The method of claim 7, wherein the media communicationsession is an audio communication session.
 9. The method of claim 7,wherein the media communication session is a video communicationsession.
 10. The method of claim 3, wherein the media is real-timemedia, and wherein the communication session is a real-timecommunication session.
 11. The method of claim 4, wherein the media isreal-time media, and wherein the communication session is a real-timecommunication session.
 12. The method of claim 5, wherein the media isreal-time media, and wherein the communication session is a real-timecommunication session.
 13. A communication platform hardware systemcomprising: a communication processing server that is located in a firstregion, wherein: a first media service is located in a second region,the communication processing server is constructed to establish a mediacommunication session with a first endpoint of the second region, thefirst media service is constructed to process media of the mediacommunication session and generate data during the processing of themedia, wherein the first media service processes the media based on amedia processing instruction, and wherein the media is processed by thefirst media service independently of a latency caused by the generatingof the data, the second region implements at least one resource, for thefirst media service, that differs from resources implemented in thefirst region, the communication platform hardware system is constructedto store the generated data in the first region as a first applicationprogramming interface (API) resource, and the communication platformhardware system is constructed to provide an external system with accessto the first API resource in the first region.
 14. The system of claim13, wherein the first media service is a recording service, and whereinthe generated data is recording data of the media communication session.15. The system of claim 13, wherein the first media service is atext-to-speech service, and wherein the generated data is text-to-speechdata of the media communication session.
 16. The system of claim 13,wherein the first media service is a speech recognition service, andwherein the generated data is speech recognition data of the mediacommunication session.
 17. The system of claim 13, wherein the firstmedia service is an input detection service, and wherein the generateddata is input detection data of the media communication session.